<?php

class Xzsdsplus_Costpriceplus_Model_Price_Group extends Mage_Eav_Model_Entity_Attribute_Source_Abstract{
    
	protected function _construct() {
        $this->_init('costpriceplus/price_group');
    }
    
    public function getAllOptions() {

    	$collection = Mage::getModel('costpriceplus/groups')->getCollection(); //->addWebsiteFilter($storeId);
    	$collection->load();
    	$values = array();
    	$values[] = array(
    		'value' => '0',
    		'label' => Mage::helper('costpriceplus')->__('Disabled')
    	);
    	foreach ($collection as $item) {
    		$values[] = array(
    			'value' => $item->getId(),
    			'label' => $item->getGroupName() . ( ($item->getIsActive()) ? '' : ' (' .  Mage::helper('costpriceplus')->__('inactive') . ')' )
    		);
    	}
    	return $values;
    }
}